import request from '@/utils/request'
// https://api-hmzs.itheima.net/v1/parking/rule/list
export function getRuleListApi(params) {
  return request({
    url: 'parking/rule/list',
    params
  })
}

// 添加接口
//  https://api-hmzs.itheima.net/v1/parking/rule
export function addRuleApi(data) {
  return request({
    url: 'parking/rule',
    method: 'post',
    data
  })
}

// 删除按钮
//  https://api-hmzs.itheima.net/v1/parking/rule/{id}

export function deleteRuleApi(id) {
  return request({
    url: `parking/rule/${id}`,
    method: 'delete'
  }
  )
}
// 编辑计费规则
//  https://api-hmzs.itheima.net/v1/parking/rule/{id}
export function editRuleApi(id) {
  return request({
    url: `parking/rule/${id}`,
    method: 'get'
  })
}

/**
 *
 * 编辑计费规则
 * @export
 * @param {*} data
 * @return {*}
 */
export function editParkingRuleAPI(data) {
  return request({
    url: `/parking/rule`,
    method: 'put',
    data
  })
}
